home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Plug-In Power Pack for Netscape Communicator
/
Plug-In Power Pack for Netscape Communicator.iso
/
plugins
/
dataviews
/
dvtools
/
demos
/
mfgdemo
/
mfg_data.c
< prev
next >
Wrap
C/C++ Source or Header
|
1997-05-08
|
5KB
|
124 lines
#ifndef lint
static char SccsId[]= "@(#)mfg_data.c V1.10 3/15/95";
#endif
/*------------------------------------------------------------------
| file name -- mfg_data.c
|-----------------------------------------------------------------*/
#include "std.h"
#include "dvstd.h"
#include "dvtools.h"
#include "mfg_vars.h"
#include "mfg_data.h"
#include "mfg_fundecl.h"
/* DECLARATION global variables for REBIND DATA variables */
/* STAMPING AREA */
FLOAT
stamping_on[NUM_STAMPERS], stamping_auto[NUM_STAMPERS] =
{AUTO, AUTO, AUTO}, stamping_up[NUM_STAMPERS], stamping_temp[NUM_STAMPERS] =
{250, 250, 250}, stamping_pressure[NUM_STAMPERS] =
{400, 425, 375}, total_pcs, accum_pcs;
CHAR
stamping_status[NUM_STAMPERS][20];
/* WELDING AREA */
CHAR
welding_pgm[NUM_WELDERS][20] =
{"logo/cell 1", "logo/cell 2"}, welding_status[NUM_WELDERS][20], welding_pcs_status[NUM_WELDERS][20];
FLOAT
welding_unit_id[NUM_WELDERS] =
{101, 102}, welding_on[NUM_WELDERS], welding_temp[NUM_WELDERS] =
{150, 150}, welding_curr[NUM_WELDERS], welding_green_on[NUM_WELDERS], welding_yellow_on[NUM_WELDERS], welding_red_on[NUM_WELDERS], welding_cycle[NUM_WELDERS];
/* PAINT SHOP AREA */
FLOAT
paint_color = 0, oven_temp[NUM_OVENS] =
{375}, oven_prev_temp[NUM_OVENS] =
{375}, oven_set[NUM_OVENS] =
{375}, oven_auto[NUM_OVENS] =
{AUTO}, oven_output[NUM_OVENS] =
{54}, oven_blink[NUM_OVENS] =
{0}, oven_ack[NUM_OVENS] =
{0};
/* DECLARATION of varname:data_info table
| Each time you add a variable to the view that you want
| to rebind to application data, you should add it to
| this table.
|
| If you add an entry to DataTable, make sure you increment
| MAX_APP_VARS (defined in mfg_data.h) accordingly.
*/
DATA_INFO DataInfo[MAX_APP_VARS] =
{
/* overview */
"total_pcs", (ADDRESS) & total_pcs,
/* stamping machine #1 */
"stamping1_on", (ADDRESS) & stamping_on[0],
"stamping1_auto", (ADDRESS) & stamping_auto[0],
"stamping1_up", (ADDRESS) & stamping_up[0],
"stamping1_temp", (ADDRESS) & stamping_temp[0],
"stamping1_pressure", (ADDRESS) & stamping_pressure[0],
"stamping1_status", (ADDRESS) & stamping_status[0][0],
/* stamping machine #2 */
"stamping2_on", (ADDRESS) & stamping_on[1],
"stamping2_auto", (ADDRESS) & stamping_auto[1],
"stamping2_up", (ADDRESS) & stamping_up[1],
"stamping2_temp", (ADDRESS) & stamping_temp[1],
"stamping2_pressure", (ADDRESS) & stamping_pressure[1],
"stamping2_status", (ADDRESS) & stamping_status[1][0],
/* stamping machine #3 */
"stamping3_on", (ADDRESS) & stamping_on[2],
"stamping3_auto", (ADDRESS) & stamping_auto[2],
"stamping3_up", (ADDRESS) & stamping_up[2],
"stamping3_temp", (ADDRESS) & stamping_temp[2],
"stamping3_pressure", (ADDRESS) & stamping_pressure[2],
"stamping3_status", (ADDRESS) & stamping_status[2][0],
/* assembly */
"accum_pcs", (ADDRESS) & accum_pcs,
/* welding robot #1 */
"welding1_status", (ADDRESS) & welding_status[0][0],
"welding1_pcs_status", (ADDRESS) & welding_pcs_status[0][0],
"welding1_pgm", (ADDRESS) & welding_pgm[0][0],
"welding1_unit_id", (ADDRESS) & welding_unit_id[0],
"welding1_on", (ADDRESS) & welding_on[0],
"welding1_temp", (ADDRESS) & welding_temp[0],
"welding1_curr", (ADDRESS) & welding_curr[0],
"welding1_green_on", (ADDRESS) & welding_green_on[0],
"welding1_yellow_on", (ADDRESS) & welding_yellow_on[0],
"welding1_red_on", (ADDRESS) & welding_red_on[0],
"w1_cycle_step", (ADDRESS) & welding_cycle[0],
/* welding robot #2 */
"welding2_status", (ADDRESS) & welding_status[1][0],
"welding2_pcs_status", (ADDRESS) & welding_pcs_status[1][0],
"welding2_pgm", (ADDRESS) & welding_pgm[1][0],
"welding2_unit_id", (ADDRESS) & welding_unit_id[1],
"welding2_on", (ADDRESS) & welding_on[1],
"welding2_temp", (ADDRESS) & welding_temp[1],
"welding2_curr", (ADDRESS) & welding_curr[1],
"welding2_green_on", (ADDRESS) & welding_green_on[1],
"welding2_yellow_on", (ADDRESS) & welding_yellow_on[1],
"welding2_red_on", (ADDRESS) & welding_red_on[1],
"w2_cycle_step", (ADDRESS) & welding_cycle[1],
/* paint shop */
"paint_color", (ADDRESS) & paint_color,
"oven1_temp", (ADDRESS) & oven_temp[0],
"oven1_set", (ADDRESS) & oven_set[0],
"oven1_auto", (ADDRESS) & oven_auto[0],
"oven1_output", (ADDRESS) & oven_output[0],
"oven1_blink", (ADDRESS) & oven_blink[0],
"oven1_ack", (ADDRESS) & oven_ack[0],
};